home *** CD-ROM | disk | FTP | other *** search
- head 1.4;
- branch ;
- access ;
- symbols beta10:1.3;
- locks death:1.4;
- comment @# @;
-
-
- 1.4
- date 93.04.04.23.30.44; author death; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 93.01.09.21.07.30; author death; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 93.01.01.11.51.37; author death; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 92.12.31.15.34.17; author death; state Exp;
- branches ;
- next ;
-
-
- desc
- @
- @
-
-
- 1.4
- log
- @Sun Apr 4 23:30:44 PDT 1993
- @
- text
- @%BEGIN Lines
-
- %%%%%%%%%%%%%
- % Define the current pict point used for drawing lines
- %%%%%%%%%%%%%
- /currentX 0 def
- /currentY 0 def
-
- %%%%%%%%%%%%%
- % Name: PICTline
- % Syntax: x1 y1 x2 y2 PICTline -
- % About: Draws a line from first to second point, using current pattern,
- % width&height. This is drawn in the Mac way, with the pen down
- % and right of coordinate. pen size of 1 is stroked so it looks
- % better (but not placed as accurately)
- %%%%%%%%%%%%%
- /PICTline
- {
- /endY exch def
- /endX exch def
- /startY exch def
- /startX exch def
-
- %
- % Only draw if pensize > 0
- %
- penHeight 0 gt
- penWidth 0 gt
- and
- {
- gsave
- penPattern usePattern
- newpath
- %
- % If pensize is 1, do simple display.
- %
- penHeight 1 eq
- penWidth 1 eq
- and
- {
- startX startY moveto
- endX endY lineto
- stroke
- }
- {
- %
- % Draw the line as a multi-sided shape. compute corner
- % coords based on which direction it is drawn in.
- %
- endY startY lt
- {
- endX startX gt
- {
- startX startY moveto
- endX endY lineto
- endX penWidth add endY lineto
- endX penWidth add endY penHeight add lineto
- startX penWidth add startY penHeight add lineto
- startX startY penHeight add lineto
- }
- {
- startX penWidth add startY moveto
- endX penWidth add endY lineto
- endX endY lineto
- endX endY penHeight add lineto
- startX startY penHeight add lineto
- startX penWidth add startY penHeight add lineto
- }
- ifelse
- }
- {
- endX startX gt
- {
- startX startY moveto
- startX penWidth add startY lineto
- endX penWidth add endY lineto
- endX penWidth add endY penHeight add lineto
- endX endY penHeight add lineto
- startX startY penHeight add lineto
- }
- {
- startX startY moveto
- endX endY lineto
- endX endY penHeight add lineto
- endX penWidth add endY penHeight add lineto
- startX penWidth add startY penHeight add lineto
- startX penWidth add startY lineto
- }
- ifelse
- }
- ifelse
- closepath
- fill
- } % End pensize = 1.
- ifelse
- grestore
- } % End pensize >0
- if
- } def
-
-
-
- %%%%%%%%%%%%%
- % Name: line [0020]
- % Syntax: x1 y1 x2 y2 line -
- % About: Given a pair of x,y coordinates, draw a pict-style line from
- % the first to the last, and store the current point.
- %%%%%%%%%%%%%
- /line
- {
- /endY exch def
- /endX exch def
- /startY exch def
- /startX exch def
-
- startX startY endX endY PICTline
-
- /currentX endX def
- /currentY endY def
- } def
-
- %%%%%%%%%%%%%
- % Name: LineFrom [0021]
- % Syntax: x2 y2 line -
- % About: Draws a line from the current pon to the x and y coord passed.
- %%%%%%%%%%%%%
- /lineFrom
- {
- /endY exch def
- /endX exch def
- currentX currentY endX endY line
- } def
-
- %%%%%%%%%%%%%
- % Name: line [0022]
- % Syntax: x1 y1 dx dy line -
- % About: Draws a line from pt 1 to pt 1' (1' = 1 + dx,dy)
- %%%%%%%%%%%%%
- /shortLine
- {
- /dy exch def
- /dx exch def
- /startY exch def
- /startX exch def
- startX startY startX dx add startY dy add line
- } def
-
- %%%%%%%%%%%%%
- % Name: ShortLineFrom [0023]
- % Syntax: dx dy ShortLineFrom -
- % About: Draws a line the current to the pased offset from it
- %%%%%%%%%%%%%
- /shortLineFrom
- {
- /dy exch def
- /dx exch def
- currentX currentY currentX dx add currentY dy add line
- } def
-
- %END Lines
- @
-
-
- 1.3
- log
- @Sat Jan 9 21:07:30 PST 1993
- @
- text
- @@
-
-
- 1.2
- log
- @Fri Jan 1 11:51:36 PST 1993
- @
- text
- @d10 94
- @
-
-
- 1.1
- log
- @Thu Dec 31 15:34:17 PST 1992
- @
- text
- @@
-